package com.ie.controller.admin;

import com.ie.common.http.ResponseResult;
import com.ie.common.security.anno.AuthIgrone;
import com.ie.sevice.admin.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@AuthIgrone
@RequestMapping("/api/admin/orders")
public class OrdersController {

    @Autowired
    private OrdersService ordersService;

    /**
     * 获取所有订单信息（分页）
     */
    @AuthIgrone
    @GetMapping("/getAllOrders")
    public ResponseResult<Map<String, Object>> getAllOrders() {
        return ordersService.getAllOrders();
    }
}
